package com.example.pushup;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.app.AlertDialog;
import android.content.DialogInterface;


public class MenuActivity extends Activity {
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu);	
		
		
		Button startBt= (Button)findViewById(R.id.startButton);
		startBt.setOnClickListener(new OnClickListener(){
			public void onClick(View v){
				Intent intent= new Intent(MenuActivity.this, SettingActivity.class);
				startActivity(intent);
			}
		});
		
		
		Button chalngBt = (Button)findViewById(R.id.challengeButton);
		chalngBt.setOnClickListener(new OnClickListener(){
			public void onClick(View v){
				
				AlertDialog.Builder dlg = null;
				dlg = new AlertDialog.Builder( MenuActivity.this );
				dlg.setMessage( "Android.com");
				dlg.setTitle( "Basic Alert Dialog" );
				
				dlg.setPositiveButton("Ȯ��", new DialogInterface.OnClickListener() {
					
					@Override
					public void onClick(DialogInterface dialog, int which) {
						
						Intent intent= new Intent(MenuActivity.this, ChallengeActivity.class);
						startActivity(intent);
					}
				});
				
				dlg.show(); 
				
			}
		});
		
		Button backBt= (Button)findViewById(R.id.backButton);
		backBt.setOnClickListener(new OnClickListener(){
			public void onClick(View v){
				Intent intent= new Intent(MenuActivity.this, MainActivity.class);
				startActivity(intent);
			}
		});

	}
		
}
